package com.happysearch.action.search;

import java.util.Set;

import org.nlp.vec.VectorModel;

import com.happysearch.service.SearchWordService;
import com.opensymphony.xwork2.ActionSupport;

public class SearchAction extends ActionSupport {

	private static final long serialVersionUID = -8476892914530714008L;
	private String keyWord;
	private Set<VectorModel.WordScore> resultSet;
	@Override
	public String execute() throws Exception {
		System.out.println("keyWord:" + keyWord);
		resultSet = SearchWordService.getInstance()
				.getSimlar(keyWord);
		return SUCCESS;
	}

	public String getKeyWord() {
		return keyWord;
	}

	public void setKeyWord(String keyWord) {
		this.keyWord = keyWord;
	}

	public Set<VectorModel.WordScore> getResultSet() {
		return resultSet;
	}

	public void setResultSet(Set<VectorModel.WordScore> resultSet) {
		this.resultSet = resultSet;
	}

}
